home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / asm / sincos.zip / SINCOSDD.BAS < prev    next >
BASIC Source File  |  1993-05-09  |  754b  |  31 lines

  1. '
  2. ' Written by Draeden /VLA
  3. '    
  4. ' Feel free to use in any manner that pleases you.
  5. ' Creates a neat little chart of sin/cosine value.
  6. '
  7. ' WARNING: Not to be read while operating heavy machinery
  8. '
  9.     
  10.     PI=3.1415926
  11.     NumAng = 256      'number of angle divisions per 2*pi
  12.     open "sincos.dd" for output as 1
  13.     print #1, "Sine   dd ";
  14.     count = 0:MaxCount = 8
  15.     for Y=0 to NumAng * 1.25 -1
  16.         SI=INT(SIN(Y*2*PI/NumAng)*65536  + .5)
  17.         if count > 0 then print #1, ",";
  18.         print #1, using "######"; si;
  19.         count = count +1
  20.         if y=NumAng/4-1 then
  21.             print #1, " ":Print #1,"Cosine dd ";
  22.             count = 0
  23.         Else
  24.             if count >= MaxCount and y < NumAng*1.25-1 Then
  25.                 print #1, " ":print #1, "       dd ";
  26.                 count = 0
  27.             END if
  28.         End If
  29.     next
  30.  
  31.